package net.yxsoft.enumclass.infrastructure;

import rapid.core.EnumClsBase;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by mlb on 2016/8/31.
 */
public class DbFieldTypeEnumCls extends EnumClsBase<DbFieldTypeEnumCls> {

  public DbFieldTypeEnumCls(String text, String value) {
    super(text, value);
  }

  public static DbFieldTypeEnumCls VARCHAR2_100 = new DbFieldTypeEnumCls("VARCHAR2(100)", "VARCHAR2(100)");

  public static DbFieldTypeEnumCls VARCHAR2_400 = new DbFieldTypeEnumCls("VARCHAR2(400)", "VARCHAR2(400)");

  public static DbFieldTypeEnumCls VARCHAR2_2000 = new DbFieldTypeEnumCls("VARCHAR2(2000)", "VARCHAR2(2000)");

  public static DbFieldTypeEnumCls DATE = new DbFieldTypeEnumCls("DATE", "DATE");

  public static DbFieldTypeEnumCls CHAR_1 = new DbFieldTypeEnumCls("CHAR(1)", "CHAR(1)");

  public static DbFieldTypeEnumCls NUMBER = new DbFieldTypeEnumCls("NUMBER", "NUMBER(18)");

  public static DbFieldTypeEnumCls NUMBER_2 = new DbFieldTypeEnumCls("NUMBER_2", "NUMBER(18,2)");

  public static DbFieldTypeEnumCls CLOB = new DbFieldTypeEnumCls("CLOB", "CLOB");

  public static List<DbFieldTypeEnumCls> COLLECTS_DEFAULTS = new ArrayList<DbFieldTypeEnumCls>() {
    {
      add(VARCHAR2_100);
      add(VARCHAR2_400);
      add(VARCHAR2_2000);
      add(DATE);
      add(CHAR_1);
      add(NUMBER);
      add(NUMBER_2);
      add(CLOB);
    }
  };

  public static List<DbFieldTypeEnumCls> COLLECTS_VARCHAR2 = new ArrayList<DbFieldTypeEnumCls>() {
    {
      add(VARCHAR2_100);
      add(VARCHAR2_400);
      add(VARCHAR2_2000);
    }
  };


}
